package com.woniu40.petai_user.mapper;

import com.woniu40.petai_user.entity.Goods;
import com.woniu40.petai_user.entity.ProductType;
import com.woniu40.petai_user.vo.GoodsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Repository
public interface GoodsMapper {
    int deleteByPrimaryKey(Integer goodsId);

    int insert(Goods record);

    Goods selectByPrimaryKey(Integer goodsId);

    List<Goods> selectAll();

    int updateByPrimaryKey(Goods record);

    List<GoodsVo> selectBySoMany(@Param( "productTypeName")String productTypeName,
                                 @Param("goodsTypeName")String goodsTypeName,
                                 @Param("goodsName")String goodsName,
                                 @Param("brandName")String brandName,
                                 @Param("minPrice")BigDecimal minPrice,
                                 @Param("maxPrice")BigDecimal maxPrice,
                                 @Param("orderid")Integer orderid
                                 );


    List<GoodsVo> selectBySaleCount();


    GoodsVo selectByGoodsId(Integer goodsId);



}